import { defineStore } from 'pinia';

export const menuStore = defineStore('menuStore', {
	state: () => {
		return {
			active: 0,
			component: 'cloud-file',
			list: [{ label: '网盘文件', component: 'cloud-file' }, { label: '记事本', component: 'notebook' }]
		};
	},
	actions: {
		menuChange(index) {
			this.active = index
			this.component = this.list[index].component
		}
	},
});